package com.example.seckill.exception;

import com.example.seckill.common.CodeMsg;
import lombok.Getter;

@Getter
public class SeckillException extends RuntimeException {
    private final CodeMsg codeMsg;

    public SeckillException(CodeMsg codeMsg) {
        super(codeMsg.getMsg());
        this.codeMsg = codeMsg;
    }

    public SeckillException(CodeMsg codeMsg, Throwable cause) {
        super(codeMsg.getMsg(), cause);
        this.codeMsg = codeMsg;
    }
} 